package com.minew.beaconset.beaconset.comparator;


import com.minew.beaconset.bean.LocaltionLog;

import java.util.Comparator;
import java.util.Date;

public class LocalDataCopmarator implements Comparator<LocaltionLog> {

    @Override
    public int compare(LocaltionLog t1, LocaltionLog t2) {
        Date d1 = t1.getCreateDate();
        Date d2 = t2.getCreateDate();
        if (d1.before(d2)) {
            return 1;
        } else {
            return -1;
        }
    }
}
